import http from "../request.js";

// 发送邮件
export function writeAnEmail(data) {
	return http.request({
		url: "/admin/email/writeAnEmail",
		method: "post",
		data,
	});
}
// 查询已发送邮件列表
export function sentEmailList(data) {
	return http.request({
		url: "/admin/email/sentEmailList",
		method: "post",
		data,
	});
}
// 查询收件箱邮件列表
export function inboxEmailList(data) {
	return http.request({
		url: "/admin/email/inboxEmailList",
		method: "post",
		data,
	});
}
// 查询抄送邮件列表
export function emailCopyList(data) {
	return http.request({
		url: "/admin/emailCopy/copies",
		method: "post",
		data,
	});
}
// 未读已读
export function markAsRead(data) {
	return http.request({
		url: "/admin/email/markAsRead",
		method: "get",
		params: data,
	});
}
// 邮件详情
export function emailDetails(data) {
	return http.request({
		url: "/admin/email/emailDetails/" + data,
		method: "get",
	});
}
// 回复邮件
export function reply(data) {
	return http.request({
		url: "/admin/email/reply",
		method: "post",
		data,
	});
}
// 
export function uploadPicture(data, name) {
	return http.request({
		url: "/admin/email/uploadPicture?directoryName=" + name,
		method: "post",
		data,
	});
}